﻿<%@ Page EnableViewState="false" Title="" Language="C#" MasterPageFile="~/MasterPages/Site.Master" AutoEventWireup="true" CodeBehind="Search.aspx.cs" Inherits="GUI.Pages.News.Search" %>

<%@ OutputCache VaryByParam="*" Duration="180" %>
<%@ Register TagPrefix="uc" TagName="ListNewsByTag" Src="~/Controls/News/ListNewsByTag.ascx" %>
<%@ Register TagPrefix="uc" TagName="LatestNews" Src="~/Controls/News/LatestNews.ascx" %>
<%@ Register TagPrefix="uc" TagName="Paging" Src="/Controls/Shared/Paging.ascx" %>
<%@ Register TagPrefix="adv" TagName="TopDefault" Src="~/Controls/Advertising/TopDefault.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMainContent" runat="server">
    <adv:TopDefault ID="TopDefault1" runat="server" />
    <div class="mgt15 clearfix">
        <div class="clearfix">
            <div class="w660 fl">
                <div class="sub-news1">
                    <h1 class="title-luongsukien">
                        <span>
                            <asp:Literal ID="ltrTitle" runat="server"></asp:Literal></span>
                    </h1>
                    <div class="clearfix mgt15 w660">
                        <uc:ListNewsByTag ID="ctrListNewsByTag" runat="server" />
                    </div>
                    <div class="paging clearfix">
                        <uc:Paging ID="ctrPaging" runat="server" />
                    </div>
                </div>
            </div>
            <div class="w300 fr">
                <uc:LatestNews runat="server" />
            </div>
        </div>
    </div>
    <script type="text/javascript">
        onLoad(function () {
            var url = document.location.href;
            $('.paging a').each(function () {
                var regex = new RegExp("/page-([0-9]+).htm");
                var pageIndex = $(this).attr('href').match(regex)[1];
                $(this).attr('href', String.format("/tim-kiem.htm?keywords={0}&pageIndex={1}", "<%=Keywords %>", pageIndex));
            });

            $("#textSearch").val("<%=Keywords %>");
        });
    </script>
</asp:Content>
